package com.qf.qfusermanager.web.controller;

import com.qf.common.bean.R;
import com.qf.common.model.QfMenu;
import com.qf.qfusermanager.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;


    @PostMapping("/all")
    public R menuAll(){

        List<QfMenu> menus = menuService.findAllMenu();

        return R.ok(menus);
    }
}
